#include <iostream>
using namespace std;
//总共3KT煤
#define TOTALCOAL 3000.0
//运送距离1000KM
#define DISTANCE 1000.0
//每次最多运送1000T
#define MAX_TRANS 1000.0
int main()
{
  int n = TOTALCOAL / MAX_TRANS;
  float anMidPoint[n];
  float nTotalDis = 0;
  for(int i = 0; i < (n - 1); i++)
  {
    anMidPoint[i] = MAX_TRANS / (2 * (n - i) - 1);
    nTotalDis += anMidPoint[i];
  }
  anMidPoint[n - 1] = DISTANCE - nTotalDis;
  cout << "Total coal: \t\t" << TOTALCOAL << " T" << endl;
  cout << "Transport distance: \t" << DISTANCE << " KM" << endl;
  cout << "Transport volume: \t" << MAX_TRANS << " T/KM"<< endl;
  cout << "Profit: \t\t" << MAX_TRANS - anMidPoint[n - 1] << " T"<< endl;
  return 0;
}
